const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
module.exports = {
  mode: "development",
  entry: {
    main: "./src/index.js",
    a: "./src/a.js",
    b: "./src/b.js",
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: "./public/index.html",
      filename: "index.html",
      chunks: ["main"],
    }),
    new HtmlWebpackPlugin({
      template: "./public/index.html",
      filename: "a.html",
      chunks: ["a"],
    }),
    new CleanWebpackPlugin(),
  ],
};
